package com.web.exiaodao.remote.vo;

import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.math.NumberUtils;

/**
 * @author eason.zt
 * @ClassName: FranchiseTableVo
 * @Description:加盟申请 Vo
 * @date 2015年3月23日 下午1:00:00
 */
@ApiModel(value = "加盟申请Vo对象")
public class FranchiseTableVo {

    @ApiModelProperty(value = "主键，自动增长")
    private Long id;

    @ApiModelProperty(value = "创建时间")
    private String createTime;

    @ApiModelProperty(value = "申请人ID,申请人ID")
    private Long userId;
    @ApiModelProperty(value = "申请人姓名,申请人姓名")
    private String customer_Name;
    @ApiModelProperty(value = "手机号码,手机号码")
    private String cellphone;
    @ApiModelProperty(value = "公司名称(别的信息全在照片上面),公司名称")
    private String franchise_Unit_Name;
    @ApiModelProperty(value = "照片（多张）,照片（多张）")
    private String franchise_Unit_PicUrls;
    /**
     * {@link com.web.exiaodao.business.constant.JConstant.FrancehiseStatus}
     */
    @ApiModelProperty(value = "审核状态,审核状态(1:待审核 2：审核通过 3：审核拒绝 )")
    private Integer franchise_State;
    @ApiModelProperty(value = "拒绝原因,拒绝原因")
    private String refuse_Reason;
    /**
     * @see FranchiseAgreementVo
     */
    @ApiModelProperty(value = "加盟协议代码多个,加盟协议多个用逗号分割 1：尊老达人合作协议 2：尊老合作协议 3：尊老机构合作协议 4：Business Agreement")
    private String agreements;
    private String agreementsStr;

    public FranchiseTableVo() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setCustomer_Name(String customer_Name) {
        this.customer_Name = customer_Name;
    }

    public String getCustomer_Name() {
        return customer_Name;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setFranchise_Unit_Name(String franchise_Unit_Name) {
        this.franchise_Unit_Name = franchise_Unit_Name;
    }

    public Integer getFranchise_State() {
        return franchise_State;
    }

    public void setRefuse_Reason(String refuse_Reason) {
        this.refuse_Reason = refuse_Reason;
    }

    public String getRefuse_Reason() {
        return refuse_Reason;
    }

    public String getFranchise_Unit_Name() {
        return franchise_Unit_Name;
    }

    public String getFranchise_Unit_PicUrls() {
        return franchise_Unit_PicUrls;
    }

    public void setFranchise_Unit_PicUrls(String franchise_Unit_PicUrls) {
        this.franchise_Unit_PicUrls = franchise_Unit_PicUrls;
    }

    public void setFranchise_State(Integer franchise_State) {
        this.franchise_State = franchise_State;
    }

    public String getAgreements() {
        return agreements;
    }

    public void setAgreements(String agreements) {
        this.agreements = agreements;
    }

    public String getAgreementsStr() {
        String str = "";
        if (this.agreements != null) {
            for (int i = 0; i < this.agreements.split(",").length; ++i) {
                int type = NumberUtils.toInt(this.agreements.split(",")[i] + "", 0);
                String name = FranchiseAgreementVo.getFranchiseAgreementNameById(type+0l);
                str = str + name + "<br>";
            }
        }
        agreementsStr = str;
        return agreementsStr;
    }
}

